<?php

namespace App\Admin\Controllers\Setting;

use App\TechnicalField;
use Encore\Admin\Controllers\AdminController;
use Encore\Admin\Form;
use Encore\Admin\Grid;
use Encore\Admin\Show;

class TechnicalFieldController extends AdminController
{
    /**
     * Title for current resource.
     *
     * @var string
     */
    protected $title = '技术领域';

    /**
     * Make a grid builder.
     *
     * @return Grid
     */
    protected function grid()
    {
        $grid = new Grid(new TechnicalField());

        $grid->column('id', __('ID'));
        $grid->column('name', __('名称'));
        //$grid->column('order', __('Order'));
        //$grid->column('state', __('State'));
        $grid->column('created_at', __('Created at'));
        $grid->column('updated_at', __('Updated at'));
        $grid->disableFilter();
        $grid->disableExport();
        $grid->disablePagination();
        return $grid;
    }

    /**
     * Make a form builder.
     *
     * @return Form
     */
    protected function form()
    {
        $form = new Form(new TechnicalField());

        $form->text('name', __('Name'));
        return $form;
    }
}
